# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-bitstruct
_pkgname=bitstruct
pkgver=8.21.0
pkgrel=1
pkgdesc='This module performs conversions between Python values and C bit field structs represented as Python byte strings.'
arch=('x86_64' 'aarch64')
url='https://pypi.org/project/bitstruct/#files'
license=('custom:unknown')
makedepends=('python-setuptools')
depends=('python')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('061339ae59efb2d797a0cf775e0c3aafdcd64f6edc9f20168fbde71f1c8c19655a3a8ce87a1d70fefa04f41ee559b5464ede3b0e38b89123f5f6e20fe9c6f6a0')

build() {
  cd "$_pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

